/* 通知系统专用样式 */

/* 通知面板样式增强 */
.notification-panel {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 0;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

/* 通知头部增强 */
.notification-panel .panel-header {
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.notification-panel .panel-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

/* 通知控制栏 */
.notification-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.notification-filters {
    display: flex;
    gap: 8px;
}

.notification-filter-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 16px;
    background-color: white;
    color: #6c757d;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.notification-filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.notification-filter-btn.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.notification-actions {
    display: flex;
    gap: 8px;
}

.notification-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #6c757d;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.notification-action-btn:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* 通知列表容器 */
.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* 自定义滚动条 */
.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 通知分组标题 */
.notification-group-title {
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.notification-group-title:first-child {
    border-top: none;
}

/* 通知项样式 */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    margin: 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.notification-item:hover {
    background-color: #f8f9fa;
    transform: none;
    box-shadow: none;
}

.notification-item:last-child {
    border-bottom: none;
}

/* 未读通知指示器 */
.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #667eea;
}

.notification-item.unread {
    background-color: #f0f4ff;
}

.notification-item.unread:hover {
    background-color: #e7f1ff;
}

/* 通知图标 */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.notification-item.critical .notification-icon {
    background-color: #fee;
    color: #dc3545;
}

.notification-item.warning .notification-icon {
    background-color: #fff3cd;
    color: #ffc107;
}

.notification-item.info .notification-icon {
    background-color: #cce7ff;
    color: #007bff;
}

.notification-item.success .notification-icon {
    background-color: #d4edda;
    color: #28a745;
}

/* 通知内容 */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.notification-time {
    font-size: 12px;
    color: #6c757d;
    margin-left: 12px;
    flex-shrink: 0;
}

.notification-message {
    font-size: 13px;
    color: #495057;
    line-height: 1.4;
    margin: 0 0 8px 0;
    word-wrap: break-word;
}

/* 通知元数据 */
.notification-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-source {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6c757d;
}

.notification-source::before {
    content: '📤';
    font-size: 12px;
}

/* 通知操作按钮 */
.notification-cta {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-cta-btn {
    padding: 4px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #495057;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.notification-cta-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.notification-cta-btn.primary {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.notification-cta-btn.primary:hover {
    background-color: #5a67d8;
}

/* 通知分类样式 */
.notification-item.system {
    border-left: 4px solid #6c757d;
}

.notification-item.data {
    border-left: 4px solid #17a2b8;
}

.notification-item.alert {
    border-left: 4px solid #dc3545;
}

.notification-item.update {
    border-left: 4px solid #28a745;
}

/* 通知徽章 */
.notification-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.notification-badge.critical {
    background-color: #dc3545;
    color: white;
}

.notification-badge.warning {
    background-color: #ffc107;
    color: #856404;
}

.notification-badge.info {
    background-color: #17a2b8;
    color: white;
}

.notification-badge.success {
    background-color: #28a745;
    color: white;
}

/* 通知空状态 */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.notification-empty-icon {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.notification-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.notification-empty-message {
    font-size: 14px;
    line-height: 1.5;
    max-width: 250px;
}

/* 桌面通知样式 */
.desktop-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 16px 20px;
    min-width: 320px;
    max-width: 400px;
    z-index: 9999;
    animation: slideIn 0.3s ease, fadeOut 0.5s ease 5s forwards;
    border-left: 4px solid #667eea;
}

.desktop-notification.critical {
    border-left-color: #dc3545;
}

.desktop-notification.warning {
    border-left-color: #ffc107;
}

.desktop-notification.info {
    border-left-color: #17a2b8;
}

.desktop-notification.success {
    border-left-color: #28a745;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.desktop-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.desktop-notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.desktop-notification-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.desktop-notification-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.desktop-notification-message {
    font-size: 13px;
    color: #495057;
    line-height: 1.4;
    margin: 0;
}

/* 通知声音指示器 */
.notification-sound-indicator {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #667eea;
    animation: soundPulse 1.5s infinite;
}

@keyframes soundPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* 通知计数器 */
.notification-counter {
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-counter:hover {
    transform: scale(1.1);
    background-color: #c82333;
}

/* 通知设置 */
.notification-settings {
    padding: 20px;
}

.notification-setting-group {
    margin-bottom: 24px;
}

.notification-setting-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
}

.notification-setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.notification-setting-item:last-child {
    border-bottom: none;
}

.notification-setting-label {
    font-size: 14px;
    color: #495057;
}

/* 开关按钮样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:focus + .slider {
    box-shadow: 0 0 1px #667eea;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .notification-panel {
        width: 100%;
        right: -100%;
    }
    
    .desktop-notification {
        min-width: calc(100% - 40px);
        max-width: calc(100% - 40px);
    }
    
    .notification-controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .notification-filters {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .notification-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .notification-item {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
    
    .desktop-notification {
        padding: 12px 16px;
    }
}